#ifndef YOOHOO_XMPPCORE_PRESENCEPARSERFACTORY_H
#define YOOHOO_XMPPCORE_PRESENCEPARSERFACTORY_H

#include "xmppcore/stanzaparser.h"
#include "xmppcore/protocolkey.h"
#include "xmppcore/xmllangtext.h"

namespace yoohoo_xmppcore {

class Presence;

class PresenceParser : public StanzaParser {
public:
	PresenceParser();
	bool processText(QString path, QString text);

protected:
	Stanza* stanza();
	bool setType(QString sType);
	bool doProcessAttributes(QString path, QList<ParsingAttribute> attributes);

protected:
	Presence* _presence;
	XmlLangText _status;

private:
	static const QString PATH_PRESENCE_STATUS;
	static const QString PATH_PRESENCE_SHOW;
	static const QString PATH_PRESENCE_PRIORITY;
	static const QString PATH_PRESENCE;
};

class PresenceParserFactory : public XmppParserFactory {
public:
	ProtocolKey protocolKey();
	XmppParser* createParser();
};


}

#endif
